<?php $this->beginContent('//layouts/main'); ?>

<div id="sidebar1" class="sidebar">
	<ul>
		<?php
		
		// Sticky
		$properties = array(
			'title'=>'Atensi',
			'tagName'=>'li',
			'contentCssClass'=>'view',
		);
		$this->beginWidget('zii.widgets.CPortlet', $properties);
		$this->widget("StickyWidget");
		$this->endWidget();

		// User Control Panel
		if (Yii::app()->user->isGuest) {
			$properties = array(
				'title'=>'Login',
				'tagName'=>'li',
				'contentCssClass'=>'form',
			);
			$this->beginWidget('zii.widgets.CPortlet', $properties);
			$this->widget("LoginWidget");
			$this->endWidget();
		} else {
			$properties = array(
				'title'=>'User Control Panel',
				'tagName'=>'li',
				'contentCssClass'=>'portlet-content',
			);
			$this->beginWidget('zii.widgets.CPortlet', $properties);
			$widget = 'zii.widgets.CMenu';
			$properties = array(
				'items'=>Yii::app()->user->menu,
				'activeCssClass'=>'current_page_item',
			);
			$this->widget($widget, $properties);
			$this->endWidget();
		}

		// Calendar
		$properties = array(
			'title'=>'Kalendar',
			'tagName'=>'li',
			'contentCssClass'=>'view',
		);
		$this->beginWidget('zii.widgets.CPortlet', $properties);
		$this->widget("CalendarWidget");
		$this->endWidget();
		?>
	</ul>
</div>

<div id="content">
	<?php echo $content; ?>
</div><!-- content -->

<!-- start sidebars -->
<div id="sidebar2" class="sidebar">
	<ul>
		<?php
		// Operations
		$properties = array(
			'title'=>'Operasi',
			'tagName'=>'li',
			'contentCssClass'=>'portlet-content',
		);
		$this->beginWidget('zii.widgets.CPortlet', $properties);
		$widget = 'zii.widgets.CMenu';
		$properties = array(
			'items'=>$this->menu,
		);
		$this->widget($widget, $properties);
		$this->endWidget();

		// Send News
		$properties = array(
			'title'=>'Kirim Berita',
			'tagName'=>'li',
			'contentCssClass'=>'form',
		);
		$this->beginWidget('zii.widgets.CPortlet', $properties);
		$this->widget("WebNewsWidget");
		$this->endWidget();

		// AFfiliates
		$properties = array(
			'title'=>'Link',
			'tagName'=>'li',
			'contentCssClass'=>'view',
		);
		$this->beginWidget('zii.widgets.CPortlet', $properties);
		$this->widget("AffiliateWidget");
		$this->endWidget();
		?>
	</ul>
</div>
<!-- end sidebars -->

<?php $this->endContent(); ?>